/**
 * Created by Administrator on 2016/6/13.
 */
define(["jquery","frozen"],function () {
    function slider(datas){
        var txt="";
        for(var i=1;i<datas.data.banners.length;i++){
            txt+='<li data-id="'+datas.data.banners[i].id+'"><a href="'+datas.data.banners[i].url+'"><span style="background-image:url('+datas.data.banners[i].imageUrl+')"></span></a></li>';
        }

        $('.ui-slider-content').html(txt);
        var slider = new fz.Scroll('.ui-slider', {
            role: 'slider',
            indicator: true,
            autoplay: true,
            interval: 3000,
            duration:900
        });

/*        slider.on('beforeScrollStart', function(from, to) {
            console.log(from, to);
        });

        slider.on('scrollEnd', function(cruPage) {
            console.log(cruPage);
        });*/
    }
    return slider;
});